package com.example.demo.Controller;

import com.example.demo.Entity.Project;
import com.example.demo.Mapper.Project1Mapper;
import com.example.demo.Mapper.Project2Mapper;
import com.example.demo.Mapper.ProjectMapper;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
public class ProjectController {
    @Resource
    private ProjectMapper projectMapper;
    @Resource
    private Project1Mapper project1Mapper;
    @Resource
    private Project2Mapper project2Mapper;

    @RequestMapping("/project")
    public List<Project> getProject(){
        return projectMapper.findAlla();
    }
    @RequestMapping("/project1")
    public List<Project> getShop(){
        return project1Mapper.findAllb();
    }
    @RequestMapping("/project2")
    public List<Project> getSome(){
        return project2Mapper.findAllc();
    }

}
